home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 15 code / Symmetry & Tiles / Tiler Code / TileConstants.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-31  |  1.7 KB  |  72 lines  |  [TEXT/KAHL]

  1. #pragma once
  2.  
  3. // Menu constants
  4. #define kNumAppMenus    1
  5.  
  6. #define kTileMenuID     131
  7.  
  8. // Menu items
  9. #define iContRedraw        1
  10. #define iConstrain        2
  11. #define iResetTile        3
  12. //-----------------        4
  13. #define kFirstSym        5    // item number of first symmetry group in menu
  14.  
  15. // Colors for the various elements
  16. #define kBGColor        lamp_black // cold_grey
  17. #define kGridColor        fluorescent_blue // cadmium_yellow
  18. #define kDragColor        red
  19. #define kCellColor        gxWhite
  20. #define kTranslateColor    apple_yellow //incadescent_high
  21. #define kMirrorColor    apple_blue
  22. #define kGlideColor        sap_green //cinnabar_green
  23. #define kRotoColor        gxBlack //mars_yellow
  24.  
  25. #define kNumOpShapes    6    // Never need more than 6 Op shapes to show a group
  26. #define kHitTolerance    ff(3)
  27.  
  28. // Useful coords
  29. #define kStartingOffset     ff(32)
  30. #define kStartingGridSize    ff(64)
  31. #define kMinDistance        ff(16)    // minimum allowable "cell" size
  32. #define kMaxDistance        ff(128)    // maximum allowable "cell" size
  33.  
  34. // The symmetry groups
  35. enum
  36. {
  37.     p1 = kFirstSym,    // Two non-parallel translations
  38.     pg,                // Two parallel glide reflections
  39.     pm,                // Two parallel mirrors
  40.     cm,                // A reflection and a parallel glide reflection
  41.     p2,                // Four half-turns
  42.     p2mg            // A reflection and a perpendicular glide reflection
  43. };
  44.  
  45. // Symmetry operations types
  46. enum
  47. {
  48.     noOp,
  49.     transOp,    // translation
  50.     reflOp,        // reflection (a mirror)
  51.     glideOp,    // glide reflection
  52.     roto2Op,    // center of twofold rotation
  53.     roto3Op,    // center of threefold rotation
  54.     roto4Op,    // center of fourfold rotation
  55.     roto6Op        // center of sixfold rotation
  56. };
  57.  
  58. // Constraint types
  59. enum
  60. {
  61.     constrainNone,
  62.     constrainH,
  63.     constrainV,
  64.     constrainBoth // notice that ver + hor = both
  65. };
  66.  
  67. typedef struct
  68. {
  69.     gxShape    snake1;    // A manipulable contour
  70.     long    slavePt[3];    // Indices of the constrained points
  71. } dragger;
  72.